scsi: hisi_sas: Move evaluation of hisi_hba in hisi_sas_task_prep()
authorLuo Jiaxing <luojiaxing@huawei.com>
Mon, 24 Sep 2018 15:06:29 +0000 (23:06 +0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 18 Jul 2019 22:23:17 +0000 (23:23 +0100)
commit2d75fd7fd1074e7331aa2382bbdb8970d0709aab
tree53f38fe445fcdac38a1ff3876c44cdc0c0c4950e
parentba8fb0c7cd91bc710faef2975cba000259257d64
scsi: hisi_sas: Move evaluation of hisi_hba in hisi_sas_task_prep()

In evaluating hisi_hba, the sas_port may be NULL, so for safety relocate
the the check to value possible NULL deference.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Gbp-Pq: Topic bugfix/arm64/huawei-taishan
Gbp-Pq: Name 0002-scsi-hisi_sas-Move-evaluation-of-hisi_hba-in-hisi_sa.patch
drivers/scsi/hisi_sas/hisi_sas_main.c